//
//  ENChoosePhotoManager.h
//  guangebao
//
//  Created by Kuke on 2021/10/11.
//  Copyright © 2021 易联通达. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^ENChoosePhotoManagerBackSingleImageBlock)(UIImage *image, NSData*data);

@interface ENChoosePhotoConfig : NSObject

@property(nonatomic,assign)NSInteger chooseType;//0是相机和相册 1仅是相册 2仅是相机 3身份证图片
@property(nonatomic,assign)BOOL isChangeOriginalSize;//是否改变原图宽高
@property(nonatomic,assign)CGSize changeOriginalSize;//改变原图后的宽高
@property(nonatomic,assign)CGFloat changeScale;//压缩成data的程度
@property(nonatomic, assign) CGFloat maxImageSize; // 图片最大的大小，默认情况下不大于2MB(目前还没有加相关的逻辑)

- (instancetype)initIsChangeOriginalSize:(BOOL)isChangeOriginalSize changeOriginalSize:(CGSize)changeOriginalSize changeScale:(CGFloat)changeScale;

- (instancetype)initChooseType:(NSInteger)chooseType IsChangeOriginalSize:(BOOL)isChangeOriginalSize changeOriginalSize:(CGSize)changeOriginalSize changeScale:(CGFloat)changeScale;
 
@end

@interface ENChoosePhotoManager : NSObject


///选择相册和相机
+ (instancetype)chooseSingleImageVC:(UIViewController*)currentVc
                photoConfig:(ENChoosePhotoConfig*)photoConfig
       backSingleImageBlock:(ENChoosePhotoManagerBackSingleImageBlock)backSingleImageBlock;

@end



NS_ASSUME_NONNULL_END
